package com.yisu.auction.manager.core.mapper;

import com.yisu.auction.ewf.entity.Advertisement;
import com.yisu.auction.manager.domain.request.baseInfoPackage.AdvertisementRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdvertisementMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Advertisement record);

    int insertSelective(Advertisement record);

    Advertisement selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Advertisement record);

    int updateByPrimaryKey(Advertisement record);

    /**
     * author:赵杰
     * Business Description : 分页获取广告位列表
     * @param advertisementRequest 分页请求信息
     * @return 广告位列表信息
     */
    List<Advertisement> getAdvertisementByPage(AdvertisementRequest advertisementRequest);

    /**
     * author:黄萧林
     * Business Description:获取最大排序值+1
     * @return
     */
    int getMaxSort();

    /**
     * author:赵杰
     * Business Description : 通过名称删除
     * @param name
     * @return
     */
    int deleteByName(@Param("name") String name );
}